import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import '@/assets/init.css'
import '../public/font/iconfont.css'
import '../public/play/iconfont.css'
import axios from 'axios'
Vue.prototype.$http = axios

// 懒加载
import lazy from 'vue-lazyload'
Vue.use(lazy, {

    preLoad: 1,

    error: require('@/assets/n.gif'),

    loading: require('@/assets/n.gif'),

    attempt: 2,


})



// elememt-ui全局引入
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI);

//过滤器
Vue.filter('dateFormat', function(val) {
    const sj = new Date(val)
    const y = sj.getFullYear()
    const m = (sj.getMonth() + 1 + '').padStart(2, '0')
    const d = (sj.getDate() + '').padStart(2, '0')
    const hh = (sj.getHours() + '').padStart(2, '0')
    const mm = (sj.getMinutes() + '').padStart(2, '0')
    const ss = (sj.getSeconds() + '').padStart(2, '0')
    return `${y}-${m}-${d}.${hh}:${mm}:${ss}`
})





Vue.config.productionTip = false

new Vue({
    router,
    store,
    render: h => h(App)
}).$mount('#app')